import allure
from airtest.core.api import *

from common.airtest.airtest_base import AirtestBase
from common.log.log import log
from config.conf import BASE_DIR


class PointsDetailsPage:
    """
    个人中心-我的积分-积分详情页
    """

    @allure.step('积分详情页-查看积分规则')
    def view_point_rules(self):
        """查看积分规则"""
        try:
            AirtestBase().click_5(BASE_DIR + r"/element_picture/我的/积分明细页/查看积分规则按钮.png")
        except Exception as e:
            log.error(f'积分详情页-查看积分规则，过程中出现异常为：{e}')
            raise e
